package com.example.service;


import com.example.pojo.Result;
import com.example.pojo.User;

import java.util.List;

public interface UserService {
    User findByUsername(String username);

    void register(String username, String password);

    void update(User user);

    void updateAvatar(String avatarUrl);

    void updatePwd(String newPwd);

    Result sendCode(String phone);

    User findByPhone(String phone);

    String loginByPhone(String phone, String code);

    List<User> list();

    void disable(Integer id);

    void delete(Integer id);

    List<User> search(String username, Integer id, String phone, Integer role);

    User findById(Integer id);
}
